<?php


namespace App\Http\Controllers\Admin;
use App\Http\Controllers\BaseController;
use App\Models\NewUrl;
use Dingo\Api\Http\Request;

class LinkController extends BaseController
{
    /**
     * 列表
     * @param Request $request
     * @return mixed
     */
    public function index(Request $request) {
        $input = $request->input();
        $search = ['title' => '', 'status' => -1, 'start_at' => '', 'end_at' => ''];
        $users = NewUrl::apply($search, $input)->orderBy("id", "desc")
            ->paginate(per_page());
        return $this->paginate($users);
    }

}

